// the header file of QueryEvaluator, called by QueryProcessor

#ifndef QUERYEVALUATOR_H
#define QUERYEVALUATOR_H

#include "TNode.h"
#include <string>
#include <vector>
;using namespace std;

class QueryEvaluator {
public:
    static void setQueryTree(TNode n);
    static void evaluate();
    static vector<int> getResult();
	static bool getResultBoolean();
	static string getResultType();

private:
    static TNode root;//for storying query tree
	static int numChild;
	static bool found;
	static vector<TNode> rootChildren;
	static vector<TNode> children;
	static TNode node,x,y,r;//for child type,e.g. assign/var/stmt/while...;
	static int stmtNumber;
	static string stmtNumberStr;
	static string varName;
	static int varIndex;
	 
    static vector<int> result;
	static vector<int> temp;
	static vector<int> temp2;
	static bool resultBoolean;
	static string resultType;
	static int index;
	
};

#endif
